//获取应用实例
const app = getApp()
var util = require('../../utils/util.js')
var http = require('../../utils/server.js')
Page({
  data: {
    userInfo: null,
    footer: {
      index: 2
    },
  },
  onLoad: function() {},
  onShow: function() {
    var that = this;
    //用户信息
    http.post({
      url: "user/center", 
    }, function(data) {
      console.log('用户信息', data)
      that.setData({
        userInfo: data
      })
    })
  },
  toJijian: function() {
    wx.navigateTo({
      url: '/pages/userManager/jijian',
    })
  },
  shouhuodizhi: function() {
    wx.navigateTo({
      url: '/pages/address/chooseAddress/chooseAddress?list=true',
    })
  },
  banghui: function() {
    var that = this;
    wx.navigateTo({
      url: '/pages/banghui/details?id=' + that.data.userInfo.gang.gang_id,
    })
  }
})